<?php
/**
 * Joomla! 1.5 component JoomGPSTracks
 *
 * @version $Id: default.php 2009-06-24 15:40:19 svn $
 * @author Michael Pfister
 * @package joomGPStracks
 * @subpackage frontend
 * @license GNU/GPL
 * @filesource
 *
 */

defined('_JEXEC') or die('Restricted access');

echo $this->lh;
echo $this->gps->writeMap();
?>
<script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js"
      type="text/javascript"></script>

<style type="text/css">
  @import url("http://www.google.com/uds/css/gsearch.css");
  @import url("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css");
</style>

<center><div id="map" style="width: <?php echo $this->cfg->map_width; ?>px; height: <?php echo $this->cfg->map_height; ?>px;" ></div></center>
<div class="toptracks">
    <span class="headline"><?php echo JText::_('GPS_NEWEST'); ?></span>
    <ul>
    <?php
    foreach($this->newest as $new)  {
        $link = JRoute::_('index.php?option=com_joomgpstracks&view=tracks&layout=track&id=' . $new->id);
        ?>
        <li><div class="list-left"><a href="<?php echo $link; ?>"><?php echo $new->title; ?></a></div><div class="list-right"><?php echo $new->cat; ?></div><div class="no-float"></div></li>
        <?php
    }
    ?>
    </ul>
</div>
<div class="toptracks">
    <span class="headline"><?php echo JText::_('GPS_MOSTHITS'); ?></span>
    <ul>
    <?php
    foreach($this->hits as $hits)  {
        $link = JRoute::_('index.php?option=com_joomgpstracks&view=tracks&layout=track&id=' . $hits->id);
        ?>
        <li><div class="list-left"><a href="<?php echo $link; ?>"><?php echo $hits->title; ?></a></div><div class="list-right"><?php echo $hits->hits; ?> hits</div><div class="no-float"></div></li>
        <?php
    }
    ?>
    </ul>
</div>
<?php
echo $this->footer;
?>

